// https://docs.qq.com/doc/DRklaSVJpaUZpbVJ1

import request from '@/utils/request'

// 查询主IP列表
export function listMaster(query) {
  return request({
    url: '/system/master/list',
    method: 'get',
    params: query
  })
}
// 查询主IP列表 防火墙下拉数据
export function propettyMaster(query) {
  return request({
    url: '/system/master/list/propetty',
    method: 'get',
    params: query
  })
}

// 查询主IP详细
export function getMaster(id) {
  return request({
    url: '/system/master/' + id,
    method: 'get'
  })
}
// 1.6.7 查询主IP属性 {ipId,type} 1主IP 2子IP
export function getMasterPropettyList(params) {
  return request({
    url: '/system/master/ip/propetty/list',
    method: 'get',
    params
  })
}

// 1.6.5 更新主IP属性
export function putIpPropetty(data) {
  return request({
    url: '/system/master/ip/propetty',
    method: 'put',
    data
  })
}

// 新增主IP
export function addMaster(data) {
  return request({
    url: '/system/master',
    method: 'post',
    data: data
  })
}

// 修改主IP
export function updateMaster(data) {
  return request({
    url: '/system/master',
    method: 'put',
    data: data
  })
}

// 删除主IP
export function delMaster(id) {
  return request({
    url: '/system/master/' + id,
    method: 'delete'
  })
}

// 查询下拉菜单
export function listPropetty(params) {
  return request({
    url: '/system/master/list/propetty',
    method: 'get',
    params
  })
}

